
(function(window, undefind){

    function init(el) {
      var elements = document.querySelectorAll(el);
      for(var i = 0; i < elements.length; i++){
          this[i] = elements[i];
      }
          this.length = elements.length;}

     var jQuery = function(el){
         return new init(el)
    }

    jQuery.extend = function(obj) {
      for (let key in obj) {
        init.prototype[key] = obj[key]
      }
    }

    jQuery.extend2 = function(obj) {
      for (let key in obj) {
        jQuery[key] = obj[key]
      }
    }
    init.prototype = {
        html: function() {
        console.log("jq的html方法");
        },
        css: function() {
        console.log("jq的css方法");
        }
    };
      window.jQuery = window.$ = jQuery;
})(window)